package cn.bjit.mapper;

import cn.bjit.model.CouponRecordDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yx
 * @since 2022-06-13
 */
public interface CouponRecordMapper extends BaseMapper<CouponRecordDO> {
     //批量锁定优惠券记录
     int lockUseStateBatch(@Param("userId") Long userId, @Param("useState") String useState, @Param("lockCouponRecordIds") List<Long> lockCouponRecordIds);
      //更新优惠券使用记录
    void updateState(@Param("couponRecordId") Long couponRecordId, @Param("useState") String useState);
}
